import { createStore } from 'vuex'
import user from './modules/user'
import category from './modules/category'
import createPersistedstate from 'vuex-persistedstate'
export default createStore({
  state: {},
  getters: {},
  mutations: {},
  actions: {},
  modules: {
    user,
    category
  },
  plugins: [
    createPersistedstate({
      key: 'rabbit-143-pc-store', // key是存储数据的键名
      paths: ['user', 'cart'] // 是一个数组用来存放需要自动持久化的模块
    })
  ]
})
